﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Entities;

namespace Presentation
{
    public partial class QuickInfo : UserControl
    {
        public QuickInfo()
        {
            InitializeComponent();

            toolStrip1.Renderer = new CustomToolStripSystemRenderer(ToolStripBorderType.None);
        }

        public void FillData(Movie entity)
        {
            Tag = entity;

            labelTitle.Text = entity.Title;
            labelDirector.Text = entity.Director;
            labelYear.Text = entity.Year.ToString();
            labelLocation.Text = entity.VideoInfo.FileName.Replace("|", Environment.NewLine);
        }

        private void toolStripButtonClose_Click(object sender, EventArgs e)
        {
            ((Main)ParentForm).CloseQuickView();
        }

        private void linkLabelEdit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ((Main)ParentForm).GetInfo((Movie)Tag);
        }
    }
}
